#ifndef __USB_DESC_H
#define __USB_DESC_H

#include "usbd_req.h"

#define USB_DEVICE_DESCRIPTOR_TYPE              0x01
#define USB_CONFIGURATION_DESCRIPTOR_TYPE       0x02
#define USB_STRING_DESCRIPTOR_TYPE              0x03
#define USB_INTERFACE_DESCRIPTOR_TYPE           0x04
#define USB_ENDPOINT_DESCRIPTOR_TYPE            0x05
#define USB_SIZ_DEVICE_DESC                     18
#define USB_SIZ_STRING_LANGID                   4
#define USB_SIZ_STRING_SERIAL                   26

#define         Device1_Identifier          (0x1FFFF7AC)
#define         Device2_Identifier          (0x1FFFF7B0)
#define         Device3_Identifier          (0x1FFFF7B4)

extern uint8_t USBD_StrDesc[USB_MAX_STR_DESC_SIZ];
extern uint8_t USBD_OtherSpeedCfgDesc[USB_LEN_CFG_DESC];
extern USBD_DEVICE USR_desc;
extern uint8_t USBD_StringSerial[USB_SIZ_STRING_SERIAL];

void Get_SerialNum(void);
uint8_t* USBD_USR_DeviceDescriptor(uint8_t speed, uint16_t* length);
uint8_t* USBD_USR_LangIDStrDescriptor(uint8_t speed, uint16_t* length);
uint8_t* USBD_USR_ManufacturerStrDescriptor(uint8_t speed, uint16_t* length);
uint8_t* USBD_USR_ProductStrDescriptor(uint8_t speed, uint16_t* length);
uint8_t* USBD_USR_SerialStrDescriptor(uint8_t speed, uint16_t* length);
uint8_t* USBD_USR_ConfigStrDescriptor(uint8_t speed, uint16_t* length);
uint8_t* USBD_USR_InterfaceStrDescriptor(uint8_t speed, uint16_t* length);

#ifdef USB_SUPPORT_USER_STRING_DESC
uint8_t *     USBD_USR_USRStringDesc (uint8_t speed, uint8_t idx , uint16_t *length);
#endif

#endif 


